package org.nnxy.foodboot.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.nnxy.foodboot.entity.UserPreference;

/**
 * 用户偏好Mapper接口
 */
@Mapper
public interface UserPreferenceMapper extends BaseMapper<UserPreference> {
    
    /**
     * 根据用户ID获取用户偏好
     * @param userId 用户ID
     * @return 用户偏好
     */
    @Select("SELECT * FROM user_preference WHERE user_id = #{userId} AND del_flag = '0' LIMIT 1")
    UserPreference getUserPreferenceByUserId(@Param("userId") Integer userId);
} 